const Mock = require('mockjs')
const Random = Mock.Random
Mock.mock(`/api/home`, "get", require("./json/home.json"))

Mock.mock(`/api/list`, "post", () => {
    const list = []
    const count = 10
    for (var i = 0; i < count; i++) {
        list.push({
            "id": i + 1,
            "email": Random.email(),
        })
    }
    return {
        "code": 200,
        "status": 0,
        "msg": "success",
        "data": list
    }
})